<!doctype html>
<html>
 <head> 
  <meta charset="utf-8"> 
  <title>moreMenus 标签换行折叠显示更多 moreMenus - layui 第三方组件平台</title> 
  <meta name="renderer" content="webkit"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 
  <meta name="description" content="设置行数，超出隐藏"> 
  <link rel="stylesheet" href="/t/font_24081_60slu02pimt.css">
  <link rel="stylesheet" href="/layui/dist/css/layui.css">
  <link rel="stylesheet" href="/static/css/fly/global.css" charset="utf-8">
  <link rel="stylesheet" href="/static/css/global.css" charset="utf-8">
  <link rel="stylesheet" href="/static/css/global.css" charset="utf-8">
 </head>
 <body>
  <div class="layui-header header header-extends" style="background-color: #24262F;"> 
   <div class="layui-container"> <a class="logo" href="https://layui.itmtr.cn/"> <img src="/static/images/layui/logo.png" alt="layui"> </a> 
    <div class="layui-form component" lay-filter="LAY-site-header-component"></div> 
    <ul class="layui-nav"> 
     <li class="layui-nav-item layui-hide-xs"> <a href="//layui.itmtr.cn/">框架</a> </li> 
     <li class="layui-nav-item layui-hide-xs layui-this"> <a href="/extend/index.html">扩展</a> </li> 
     <li class="layui-nav-item"> <a href="javascript:;">周边</a> 
      <dl class="layui-nav-child layui-nav-child-c"> 
       <dd lay-unselect> <a href="//layui.itmtr.cn/alone.html" target="_blank">独立组件</a> 
       </dd> 
       <dd class="layui-hide-sm layui-show-xs" lay-unselect> <a href="/extend/index.html">扩展组件</a> 
        <hr> 
       </dd> 
      </dl> </li> 
    </ul> 
   </div>
  </div><!--[if lt IE 9]>  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script><![endif]--> 
  <div class="fly-extend-banner fly-extend-banner-sm"> 
   <div class="layui-carousel" id="FLY-extend-banner" data-height="200px"> 
    <div carousel-item> 
     <div style="background-image: url(/upload/2018_8/168_1535373858670_8825.jpg)">
      <div style="background: rgba(0,0,0,.6)"></div> 
     </div> 
    </div> 
   </div> 
   <h1 class="fly-extend-banner-title">layui 第三方组件平台</h1> 
   <div class="fly-extend-banner-release"> <a href="/extend/index.html" class="layui-btn layui-btn-lg">返回首页</a>
   </div> 
  </div>
  <div class="fly-extend-detail layui-card"> 
   <div class="layui-container"> 
    <div class="fly-extend-list-header"> 
     <h1 class="fly-extend-title layui-elip"> <a>moreMenus 标签换行折叠显示更多</a> <span class="layui-badge layui-bg-green layui-hide-xs">moreMenus</span> </h1> 
     <div class="fly-extend-list-info"> <a href="/u/73619952/index.html" target="_blank" class="fly-extend-list-user" title="发布者"> <cite class="layui-hide-xs">大晨**晨</cite> <img src="/static/images/fly/avatar/4.jpg" alt="大晨**晨"> </a> 
     </div> 
    </div> 
    <blockquote class="fly-extend-list-desc layui-elem-quote"> 
     <p>设置行数，超出隐藏</p> 
    </blockquote> 
    <div class="fly-extend-list-bottom"> <span class="layui-inline">创建：2021-5-2 </span> 
     <div class="layui-btn-container layui-extend-doc-edit"> 
     </div> 
    </div> 
   </div>
  </div>
  <div class="layui-container"> 
   <div class="layui-row layui-col-space20"> 
    <div class="layui-col-sm3 layui-col-md2"> 
     <div class="layui-card"> 
      <ul class="fly-extend-doc-nav" lay-filter="extend-doc-nav"> 
       <li class="layui-this" lay-id="doc"> <a href="javascript:;"><i class="iconfont icon-wendang"></i> 文档</a> </li> 
       <li lay-id="download"> <a href="javascript:;"><i class="iconfont icon-xiazai"></i> 下载</a> </li> 
       <li lay-id=""> <a href="https://gitee.com/dakedou/more-menus.git" rel="nofollow" target="_blank"> <i class="iconfont icon-kaifashili"></i> 来源 </a> </li> 
      </ul> 
     </div> 
    </div> 
    <div class="layui-col-sm9 layui-col-md10"> 
     <div class="layui-card fly-extend-doc layui-show"> 
      <div class="layui-card-header"> 
       <h3 class="layui-inline layui-this">文档</h3> 
      </div> 
      <div class="layui-card-body detail-body photos layui-text">
        moreMenus.js 文件引入
       <br>
       <pre>layui.config({<br>        base: './js/' <br>    }).extend({<br>        moreMenus: 'moreMenus' <br>    });<br> </pre>使用： 
       <br>data 必填 
       <br>rows (非必填) 设置从第几行开始折叠 默认第一行
       <br>moreUpText （非必填）设置展开文字 默认显示更多
       <br>moreDownText （非必填） 设置折叠后的文字 默认显示收起
       <br>href （非必填）设置点击跳转的地址 跳转后默认参数id = 
       <br>herfBlank (非必填) 设置跳转的target 默认_self 可选_blank
       <br>themeColor (非必填) 颜色的肢体设置 red(赤色) 、orange(橙色) 、green(墨绿色（主色调）) 、cyan(藏青色) 、blue(蓝色) 、black(黑色) 、gray(灰色)
       <br>size （非必填）大小设置 lg(大型) 、 sm(小型) 、 xs(迷你) 不填有默认
       <br>
       <br>
       <br>
       <pre>layui.use(['moreMenus'],function(){<br>    var moreMenus = layui.moreMenus<br>    moreMenus.init({<br>        elemId:'#box-item',<br>        data:data,<br>        rows:1,<br>        moreUpText:'更多',<br>        moreDownText:'收起分类',<br>        // href:'https://layui.itmtr.cn/',<br>        herfBlank:true,<br>        // themeColor:'black', // red(赤色) 、orange(橙色) 、green(墨绿色（主色调）) 、cyan(藏青色) 、blue(蓝色) 、black(黑色) 、gray(灰色)<br>        // size:'sm'  //layui-btn-lg(大型) 、  layui-btn-sm(小型) 、 layui-btn-xs(迷你)<br>    })<br> </pre>html 示例：
       <br>
       <pre>&lt;body&gt;<br><br> &lt;div id="box-item"&gt;&lt;/div&gt;<br>    <br>&lt;/body&gt;<br>&lt;/html&gt;<br>&lt;script&gt;<br>    const data =[{ id: 1, name: '果树' },<br>                { id: 2, name: '杨树' },<br>                { id: 3, name: '苹果' },<br>                { id: 4, name: '香蕉' },<br>                { id: 5, name: '芝麻蕉' },<br>                { id: 6, name: '酸菜' },<br>                { id: 7, name: '果树' },<br>                { id: 8, name: '杨树' },<br>                { id: 9, name: '杨梅' },<br>                { id: 10, name: '果汁' },<br>                { id: 11, name: '橄榄' },<br>                { id: 12, name: '鲫鱼' },<br>                { id: 13, name: '奶牛' },<br>                { id: 15, name: '橄榄' },<br>                { id: 16, name: '木鱼' },<br>                { id: 17, name: '水蛭' },<br>                { id: 18, name: '犀牛' }]<br>    layui.config({<br>        base: './js/' <br>    }).extend({<br>        moreMenus: 'moreMenus' <br>    });<br> <br>    layui.use(['moreMenus'],function(){<br>    var moreMenus = layui.moreMenus<br>    moreMenus.init({<br>        elemId:'#box-item',<br>        data:data,<br>        rows:1,<br>        moreUpText:'更多',<br>        moreDownText:'收起分类',<br>        href:'https://layui.itmtr.cn/',<br>        herfBlank:true,<br>        themeColor:'black', <br>        size:'sm'  <br>    })<br> <br>     <br>    });<br>&lt;/script&gt;</pre> 
      </div> 
     </div> 
     <div class="layui-card fly-extend-doc"> 
      <div class="layui-card-header"> 
       <h3 class="layui-inline layui-this">下载</h3> 
      </div> 
      <div class="layui-card-body detail-body layui-text"> 
       <div class="layui-btn-container"> <a href="https://gitee.com/dakedou/more-menus.git" target="_blank" class="layui-btn layui-btn-lg layui-btn-primary layui-border-red"> 去码云下载 </a> 
        <blockquote class="layui-elem-quote">
          该扩展组件由第三方用户主动投递，并由其自身进行维护，本站仅做收集。 
        </blockquote> 
       </div> 
      </div> 
     </div> 
    </div> 
   </div>
  </div>
  <div class="fly-footer"> 
   <p>Copyright © 2021 <a href="/index.html">layui.itmtr.cn</a> MIT Licensed</p>
  </div>
  <script src="/layui/dist/layui.js"></script>
  <script>// common</script>

 </body>
<script src="/common/common.js"></script>
</html>